home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / stngpasm / pure_c / include / uran / uran_bpp.sh < prev    next >
Encoding:
Text File  |  1997-08-08  |  2.6 KB  |  89 lines

  1. ;----------------------------------------------------------------------------
  2. ;File name:    URAn_BPP.SH            Revision date:    1997.08.08
  3. ;Creator:    Ulf Ronald Andersson        Creation date:    1995.07.03
  4. ;(c)1995 by:    Ulf Ronald Andersson        All rights reserved
  5. ;Released as:    FREEWARE            (commercial sale forbidden)
  6. ;----------------------------------------------------------------------------
  7. ;Purpose:    Macro library
  8. ;----------------------------------------------------------------------------
  9. ;Required header declarations:
  10. ;
  11. ;    include    "uran\STRUCT.SH"
  12. ;    include    "uran\URAn_SYS.SH"
  13. ;    include    "uran\URAn_DOS.SH"
  14. ;    include    "uran\URAn_BPP.SH"
  15. ;
  16. ;----------------------------------------------------------------------------
  17. ;Library macros:
  18. ;
  19. ;get_os_bp_p_p    =>  d0 -> -> running basepage
  20. ;
  21. ;----------------------------------------------------------------------------
  22. ;NB: You must include the following line somewhere after the macro calls
  23. ;
  24. ;    "make    BPP_links"
  25. ;
  26. ;NB: That will cause the needed routines to be included at that point.
  27. ;NB: You may do this several times (after further calls), and at each
  28. ;NB: point only the 'newly' referenced routines will be added to the code.
  29. ;NB: A dummy reference macro exists, so routines can be added to code even
  30. ;NB: without calling them.  The macro is '_uniref', used as below:
  31. ;    "_uniref get_os_bp_p_p"
  32. ;----------------------------------------------------------------------------
  33. ;    Macro definitions:
  34. ;----------------------------------------------------------------------------
  35.     _unidec    get_os_bp_p_p
  36. ;
  37.     .macro    BPP_links
  38.     _unidef    get_os_bp_p_p
  39.     .endm    ;BPP_links
  40. ;
  41. ;----------------------------------------------------------------------------
  42. ;Macro:    get_os_bp_p_p    => d0 -> -> running basepage
  43. ;
  44. .MACRO    get_os_bp_p_p
  45.     _uniref    get_os_bp_p_p
  46.     bsr    code_get_os_bp_p_p
  47. .ENDM    get_os_bp_p_p
  48. ;
  49. ;
  50. .MACRO    code_get_os_bp_p_p
  51.     movem.l    d1-d4/a0-a2,-(sp)
  52.     gemdos    Super,1.w
  53.     move.l    d0,d4
  54.     bmi.s    .keep_super_1
  55.     gemdos    Super,0.w
  56.     move.l    d0,d4
  57. .keep_super_1:
  58.     movea.l    (_sysbase).w,a0
  59.     movea.l    os_selfbeg_p(a0),a0
  60.     cmpi.w    #$102,os_version(a0)
  61.     blo.s    .older_tos        ;if version < 1.02 goto .l004d
  62.     move.l    os_currbp_p_p(a0),d3
  63.     bra.s    .exit
  64. ;
  65. .older_tos:
  66.     move.w    os_config(a0),d0
  67.     asr.w    #1,d0
  68.     subq.w    #4,d0
  69.     bne.s    .old_tos_2
  70.     move.l    #$873c,d3
  71.     bra.s    .exit
  72. ;
  73. .old_tos_2:
  74.     move.l    #$602c,d3
  75. .exit:
  76.     tst.l    d4
  77.     bmi.s    .keep_super_2
  78.     gemdos    Super|_ind,d4
  79. .keep_super_2:
  80.     move.l    d3,d0
  81.     movem.l    (sp)+,d1-d4/a0-a2
  82.     rts
  83. ;
  84. .ENDM    ;code_get_os_bp_p_p
  85. ;
  86. ;----------------------------------------------------------------------------
  87. ;End of file:    URAn_BPP.SH
  88. ;----------------------------------------------------------------------------
  89.